﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace M3G {
    public class AnimationEvent : IComparable 
    {

        #region Field
        int            eventTime;
        int            eventID;
        AnimationTrack eventTrack;
        Object3D       eventSource;
        #endregion

        #region Method

        public AnimationEvent () {
            this.eventTime   = -1;
            this.eventID     = 0;
            this.eventSource = null;
            this.eventTrack  = null;
        }

        internal AnimationEvent (int time, int id, AnimationTrack track, Object3D source) {
            this.eventTime = time;
            this.eventID = id;
            this.eventSource = source;
            this.eventTrack = track;
        }

        public int EventID {
            get { return eventID; }
        }

        public Object3D EventSource {
            get { return eventSource; }
        }

        public int EventTime {
            get { return eventTime; }
        }

        public AnimationTrack EventTrack {
            get { return eventTrack; }
        }

        public int CompareTo (object obj) {
            return eventTime - ((AnimationEvent)obj).eventTime;
        }

        #endregion
    }
}
